package com.lonwin.inspectionmanagement.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.lonwin.inspectionmanagement.mvp.contract.PatrolContract;
import com.lonwin.inspectionmanagement.mvp.model.PatrolModel;


@Module
public class PatrolModule {
    private PatrolContract.View view;

    /**
     * 构建PatrolModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public PatrolModule(PatrolContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    PatrolContract.View providePatrolView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    PatrolContract.Model providePatrolModel(PatrolModel model) {
        return model;
    }
}